Simplify LLVM IR generated for OpenCL blocks
authorAndrew Savonichev <andrew.savonichev@intel.com>
Thu, 21 Feb 2019 11:02:10 +0000 (11:02 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 2 Apr 2019 09:57:08 +0000 (10:57 +0100)
commit6defef8d2f394037a9a7087d68e2067dafa26f22
tree2d695454468b678c5db845c060aa238292bb8935
parent2824bea2a04ef8391f8d65b0601dab0b964169c0
Simplify LLVM IR generated for OpenCL blocks

Summary:
Emit direct call of block invoke functions when possible, i.e. in case the
block is not passed as a function argument.
Also doing some refactoring of `CodeGenFunction::EmitBlockCallExpr()`

Reviewers: Anastasia, yaxunl, svenvh

Reviewed By: Anastasia

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D58388

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354568 91177308-0d34-0410-b5e6-96231b3b80d8

Gbp-Pq: Name OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
clang/lib/CodeGen/CGBlocks.cpp
clang/lib/CodeGen/CGOpenCLRuntime.cpp
clang/lib/CodeGen/CGOpenCLRuntime.h
clang/test/CodeGenOpenCL/blocks.cl
clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl